<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /*---------1----------------*/
        // var age = 100;
        // var obj = {
        //     age: 20,
        //     say: () => {
        //         alert(this.age)
        //     }
        // }
        /*---------------2--------------*/
        //打印变量
        // var arr = [];
        // for (var i = 0; i < 2; i++) {
        //     arr[i] = function () {
        //         console.log(i);
        //     }
        // }
        // arr[0]();
        // arr[1]();
        /*-------3-----------*/
        let arrayLike = {
            "0": 1,
            "1": 2,
            '2': 5,
            "length": 3
        }
        let newAry = Array.from(arrayLike, item => console.log(item))//[2,4]
    </script>
</body>

</html>